package ${controllerPackage};

import net.sourceforge.stripes.controller.NameBasedActionResolver;
import net.sourceforge.stripes.util.Literal;

import java.util.Set;

/**
 * Custom action resolver
 * created: 09.08.2009 12:23:57
 * @author Michal Rost
 */
public class CustomActionResolver extends NameBasedActionResolver {

  /**
   * Returns base packages for actionBean bindings
   *
   * @return set of base packages names
   */
  @Override
  public Set<String> getBasePackages() {
    return Literal.set("${controllerPackage?substring(controllerPackage?last_index_of(".")+1)}");
  }

  /**
   * Returns binding suffix
   *
   * @return binding suffix
   */
  @Override
  public String getBindingSuffix() {
    return ".action";
  }
}
